Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gltf no animations #114

Merged
merged 1 commit into from
Jan 24, 2022
Merged

gltf no animations #114

merged 1 commit into from
Jan 24, 2022

Conversation

roy2an
Copy link

@roy2an roy2an commented Dec 24, 2021

No description provided.

@max-arias
Copy link

+1 I can confirm animations are lost in GltfModel

@SaFrMo
Copy link
Contributor

SaFrMo commented Jan 17, 2022

This looks good to me @klevron - any thoughts? Thanks @roy2an !

@klevron
Copy link
Member

klevron commented Jan 24, 2022

Thanks 👍

@klevron klevron merged commit 5ad5e87 into troisjs:master Jan 24, 2022
@ikantthink
Copy link

ikantthink commented Feb 7, 2022

It looks likes this is because the onLoad from the gltf loader component is returning only the scene and the animations are not in the scene object. They are in gltf.animations.

var GLTF = defineComponent({
  extends: Model,
  created() {
    const loader = new GLTFLoader();
    loader.load(this.src, (gltf) => {
      this.onLoad(gltf.scene);
    }, this.onProgress, this.onError);
  }
});

Edit: Somehow I missed the merged commit that solved that very issue. Doh!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants